package com.iotechn.unimall.admin.api.cardOrder;
import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.CardOrderDO;
import com.iotechn.unimall.data.dto.userCard.AdminCardOrderDetailDTO;
import com.iotechn.unimall.data.model.Page;

/**
 * 
 *
 * @author chen
 * @email 1197346512@qq.com
 * @date 2021-06-09 10:56:31
 */
@HttpOpenApi(group = "admin.cardOrder", description = "")
public interface AdminCardOrderService {

    @HttpMethod(description = "列表", permission = "list", permissionParentName = "管理", permissionName = "列表")
    public Page<CardOrderDO> list(
            @HttpParam(name = "phone", type = HttpParamType.COMMON, description = "手机号") String phone,
            @HttpParam(name = "cardNo", type = HttpParamType.COMMON, description = "卡号") String cardNo,
            @HttpParam(name = "cardOrderNo", type = HttpParamType.COMMON, description = "会员卡订单") String cardOrderNo,
            @HttpParam(name = "status", type = HttpParamType.COMMON, description = "订单状态") Integer status,
            @HttpParam(name = "storeId", type = HttpParamType.COMMON, description = "门店id") Long storeId,
            @HttpParam(name = "startTime", type = HttpParamType.COMMON, description = "开始时间") String startTime,
            @HttpParam(name = "endTime", type = HttpParamType.COMMON, description = "结束时间") String endTime,
            @HttpParam(name = "pageNo", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页长度", valueDef = "20") Integer limit,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "创建", permission = "usercard:cardorder:create", permissionParentName = "管理", permissionName = "创建")
    public CardOrderDO create(
            @NotNull @HttpParam(name = "cardOrderDO", type = HttpParamType.COMMON, description = "") CardOrderDO cardOrderDO,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "修改", permission = "usercard:cardorder:update", permissionParentName = "管理", permissionName = "修改")
    public String update(
            @NotNull @HttpParam(name = "cardOrderDO", type = HttpParamType.COMMON, description = "") CardOrderDO cardOrderDO,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "删除", permission = "usercard:cardorder:delete", permissionParentName = "管理", permissionName = "删除")
    public String delete(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "删除Id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "详情", permission = "usercard:cardorder:detail", permissionParentName = "管理", permissionName = "详情")
    public CardOrderDO detail(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "Id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "激活冻结", permission = "usercard:cardorder:update", permissionParentName = "管理", permissionName = "激活")
        public Boolean updateStatus(
                @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId,
                @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "用户信息") Long id,
                @NotNull @HttpParam(name = "status", type = HttpParamType.COMMON, description = "用户信息") Integer status) throws ServiceException;

    @HttpMethod(description = "详情", permission = "usercard:cardorder:cardOrderDetail", permissionParentName = "管理", permissionName = "详情")
    public AdminCardOrderDetailDTO cardOrderDetail(
            @NotNull @HttpParam(name = "orderId", type = HttpParamType.COMMON, description = "订单id") Long orderId,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;
}

